#!/bin/sh

set -e

# Run executables from most-debugging-enabled to least-, so if
# there's a failure we get the most informative death possible
ORDERED_METHODS="dbg debug devel profiling pro prof oprofile oprof optimized opt"

for method in ${ORDERED_METHODS}; do
    for mymethod in @METHODS@; do
        if (test "x${mymethod}" = "x${method}"); then
            MY_METHODS="${MY_METHODS} ${mymethod}"
        fi
    done
done

for method in ${MY_METHODS}; do
    for prog in message_tag packed_range parallel_sync parallel dispatch_to_packed set; do
        echo $TIMPI_RUN ./${prog}_unit-$method
        $TIMPI_RUN ./${prog}_unit-$method
    done
done
